const app = getApp()
Page({


    data: {

    },


    onLoad: function (options) {

    },


    toBannerDetail(event) {

        console.log(event.currentTarget.dataset.id)

        wx.navigateTo({
            url: '/pages/article/detail/detail?id=' + event.currentTarget.dataset.id,
        })

    },
    onShow: function () {
        var that = this;
        wx.request({
            url: app.globalData.baseUrl + 'api/gl/v1/wx/select',
            method: 'POST',
            data: {},
            success(res) {
                that.setData({
                    banner: res.data
                })
            }
        })
        // wx.cloud.database().collection("travel_articles").get()
        // .then(res => {
        //   console.log("成功", res.data)

        //   this.setData({
        //     banner: res.data
        //   })

        //   })
    },



})